package com.JZ.QM.task;


import com.JZ.QM.feign.FundFeignService;
import com.JZ.QM.feign.StockFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;

/**
 * @author lyp
 * @email lyp@gmail.com
 * @date 2020/7/5 12:48
 */
@Slf4j
@Service
public class EntrustTaskService {

    @Resource
    StockFeignService stockFeignService;
    @Resource
    FundFeignService fundFeignService;

    /**
     * 定时调用委托处理
     */
    @Scheduled(cron = "0 */2 * * * *")
    public void EntrustTaskService(){

        log.info("调用委托处理");

        fundFeignService.handleFundEntrust();

        stockFeignService.handleStockEntrust();

        fundFeignService.handleFundRedemptionEntrust();

        stockFeignService.handleStockRedemptionEntrust();

        fundFeignService.handleFundAdjustmentEntrust();

        stockFeignService.handleStockAdjustmentEntrust();

    }


}
